﻿<div class="@Classname">
    @if (!HideExample && Component is not null)
    {
        <div class="example-demo">
            <DynamicComponent Type="@Component" Parameters="@ComponentParameters" />
        </div>
    }
    <div class="@CodeClassname">
        <div class="mdui-collapse-body">
            <CodeSnippet Language="@Language" Class="example-code">@CodeContents</CodeSnippet>
        </div>
    </div>
    @if (!FixCode && !HideExample && Component is not null)
    {
        <div class="example-tools">
            <a href="javascript:;" @onclick="_ => ShowCode = !ShowCode" class="viewsource">
                @if (ShowCode)
                {
                    <MduiTooltip Message="hide code">
                        <i class="mdui-icon material-icons">arrow_drop_up</i>
                    </MduiTooltip>
                }
                else
                {
                    <MduiTooltip Message="show code">
                        <i class="mdui-icon material-icons">arrow_drop_down</i>
                    </MduiTooltip>
                }
            </a>
        </div>
    }
</div>